/*
 * simulator.h
 *
 *  Created on: May 11, 2014
 *      Author: Hercules
 */

#ifndef SIMULATOR_H_
#define SIMULATOR_H_

#define MEMORY_SIZE 1000
#include <stdio.h>
#include <stdlib.h>
#include "instructionTable.h"
typedef struct {
	short memory_block[MEMORY_SIZE];
	short acc;
	short pc;
	int program_size;
} Simulator;

enum {
	ADD = 1,
	SUB,
	MULT,
	DIV,
	JMP,
	JMPN,
	JMPP,
	JMPZ,
	COPY,
	LOAD,
	STORE,
	INPUT,
	OUTPUT,
	STOP
};
Simulator* beginSimutor(FILE* program_file);
void simulate(Simulator* sm);
void showSimulatorState(Simulator* sm);

#endif /* SIMULATOR_H_ */
